unit RamoSearchFr;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ExtCtrls, Buttons, StdCtrls,DbCtrls, MainSearchFr;

type

  { TRamoSearchFrame }

  TRamoSearchFrame = class(TMainSearchFrame)
    id_ramo: TEdit;
    desc_ramo: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure LocalizarButtonClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

implementation

uses RamoDM,QueryConditions;

{ TRamoSearchFrame }

procedure TRamoSearchFrame.LocalizarButtonClick(Sender: TObject);
 var
  condicoes: TQueryConditions;
begin
  condicoes := TQueryConditions.Create(CON_AND);
  condicoes.Add('id_ramo', id_ramo.Text);
  condicoes.AddText('desc_ramo', desc_ramo.Text);
  RamoData.Search(Condicoes, 'ramo');
end;

initialization
  {$I ramosearchfr.lrs}

end.

